from rosa.scarborough_fair.generator_setting.settings import settings
from rosa.scarborough_fair.middleware.common import middleware as common_middleware
from rosa.scarborough_fair.middleware.cors import middleware as cors_middleware
from rosa.scarborough_fair.middleware.record import middleware as record_middleware

middlewares: list[dict] = []
middlewares.extend(common_middleware)
middlewares.extend(cors_middleware)
if settings.LOG_LEVEL == "DEBUG":
    middlewares.extend(record_middleware)
